<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>陕西恒丰集团</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="./plugins/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link rel="stylesheet" href="./dist/css/bootstrap.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="./dist/css/adminlte.min.css">

    <!-- iCheck -->
    <link rel="stylesheet" href="./plugins/iCheck/flat/blue.css">
    <!-- Morris chart -->
    <!--    <link rel="stylesheet" href="./plugins/morris/morris.css">-->
    <!-- jvectormap -->
    <link rel="stylesheet" href="./plugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <!-- Date Picker -->
    <link rel="stylesheet" href="./plugins/datepicker/datepicker3.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker-bs3.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="./plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">


    <!-- DataTables -->
    <link rel="stylesheet" href="./plugins/datatables/dataTables.bootstrap4.css">
    <!-- Bootstrap time Picker -->
    <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css">
    <!-- Select2 -->
    <link rel="stylesheet" href="./plugins/select2/select2.min.css">
    <link rel="stylesheet" href="./plugins/easyUpload/easy-upload.css">


    <!-- Google Font: Source Sans Pro -->
    <!--<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">-->
    <script type="text/javascript" src="./map/js/echart/echarts.min.js"></script>
    <!--    <script type="text/javascript" src="./map/js/echart/echarts-gl.min.js"></script>
        <script type="text/javascript" src="./map/js/echart/ecStat.min.js"></script>
        <script type="text/javascript" src="./map/js/echart/dataTool.min.js"></script>-->
    <!--    <script type="text/javascript" src="./map/js/echart/china.js"></script>
        <script type="text/javascript" src="./map/js/echart/world.js"></script>
        <script type="text/javascript" src="./map/js/echart/baidu.min.is.js"></script>-->
    <!--    <script type="text/javascript" src="./map/js/echart/bmap.min.js"></script>
        <script type="text/javascript" src="./map/js/echart/simplex.js"></script>-->
    <!-- 全国344个市、区、州对应的数字编号 -->
    <!--    <script type="text/javascript" src="./map/js/citymap.js"></script>-->

    <!-- Ion Slider -->
    <link rel="stylesheet" href="./plugins/ionslider/ion.rangeSlider.css">
    <!-- ion slider Nice -->
    <link rel="stylesheet" href="./plugins/ionslider/ion.rangeSlider.skinNice.css">
    <!-- bootstrap slider -->
    <link rel="stylesheet" href="./plugins/bootstrap-slider/slider.css">
    <link href="./plugins/validate/css/bootstrapValidator.min.css" rel="stylesheet"/>
    <style>
        .card-style {
            background: none;
            color: #ffffff;
        }


    </style>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">

    <nav class="main-header navbar navbar-expand bg-primary navbar-light border-bottom">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#"><i class="fa fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="admin.action" class="nav-link">首页</a>
            </li>
        </ul>
        <!-- SEARCH FORM -->
        <form class="form-inline ml-3">
            <div class="input-group input-group-sm">
                <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
                <div class="input-group-append">
                    <button class="btn btn-navbar" type="submit">
                        <i class="fa fa-search"></i>
                    </button>
                </div>
            </div>
        </form>
        <!-- Right navbar links -->
        <ul class="navbar-nav ml-auto">
            <!-- Notifications Dropdown Menu -->
            <li class="nav-item dropdown">
                <a class="nav-link" data-toggle="dropdown" href="#">
                    <i class="fa fa-user"></i><span id="user_role"></span>
                </a>
                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right" style="min-width: 10px;">
                    <!--<span class="dropdown-item dropdown-header">15 Notifications</span>-->
                    <div class="dropdown-divider"></div>
                    <a href="javascript:menuAction(this,'./web/part_admin_pwd_modify.html',false);"
                       class="dropdown-item">
                        <i class="fa fa-lock mr-2 text-dark">&nbsp;&nbsp;&nbsp;&nbsp;修改密码</i>
                        <span class="float-right text-muted text-sm"></span>
                    </a>
                    <div class="dropdown-divider"></div>
                    <a href="../" class="dropdown-item">
                        <i class="fa fa-sign-out mr-2 text-dark">&nbsp;&nbsp;&nbsp;&nbsp;安全退出</i>
                        <span class="float-right text-muted text-sm"></span>
                    </a>
                </div>
            </li>
        </ul>
    </nav>
    <!-- /.navbar -->
    <!-- Main Sidebar Container -->
    <aside class="main-sidebar sidebar-light-primary elevation-4 ">
        <!-- Brand Logo -->
        <a href="admin.action" class="brand-link bg-primary">
            <span class="brand-text font-weight-light">陕西恒丰集团</span>
        </a>
        <div class="sidebar">
            <!-- Sidebar Menu -->
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false" id="nav">
                    <li class="nav-item ">
                        <a href="admin.action" class="nav-link active">
                            <i class="nav-icon fa fa-th"></i>
                            <p> 平台首页 </p>
                        </a>
                    </li>

                </ul>
            </nav>

            <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
    </aside>
    <!-- Content Wrapper. Contains page content -->
    <div id="content-wrapper" class="content-wrapper background-style">

    </div>
    <!-- /.content-wrapper -->
</div>

<!-- ./wrapper -->
<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="./plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<!--<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>-->
<!-- Bootstrap 4 -->
<script src="./plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Morris.js charts -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>-->
<!--<script src="./plugins/morris/morris.min.js"></script>-->
<!-- Sparkline -->
<!--<script src="./plugins/sparkline/jquery.sparkline.min.js"></script>
&lt;!&ndash; jvectormap &ndash;&gt;
<script src="./plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="./plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>-->
<!-- jQuery Knob Chart -->
<!--<script src="./plugins/knob/jquery.knob.js"></script>-->
<!-- daterangepicker -->
<script src="./dist/js/moment.min.js"></script>
<!-- datepicker -->
<!--<script src="./plugins/datepicker/bootstrap-datepicker.js"></script>-->
<!-- Bootstrap WYSIHTML5 -->
<!--<script src="./plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>-->
<!-- Slimscroll -->
<!--<script src="./plugins/slimScroll/jquery.slimscroll.min.js"></script>-->
<!-- FastClick -->
<!--<script src="./plugins/fastclick/fastclick.js"></script>-->
<!-- AdminLTE App -->
<script src="./dist/js/adminlte.js"></script>
<!--<script src="http://www.uedsc.com/wp-content/uploads/2014/08/jquery-jvectormap-cn-mill-en.js"></script>-->

<script src="./plugins/chartjs-old/Chart.min.js"></script>
<!-- Ion Slider -->
<script src="./plugins/ionslider/ion.rangeSlider.min.js"></script>
<!-- Bootstrap slider -->
<script src="./plugins/bootstrap-slider/bootstrap-slider.js"></script>
<!-- Bootstrap slider -->
<script src="./plugins/bootstrap-dialog/bootstrap-dialog.min.js"></script>
<!--<script type="text/javascript" src="./dist/js/customPlugin.js"></script>-->
<!--<script src="./dist/js/demo.js"></script>-->
<!--<script type="text/javascript"
        src="http://api.map.baidu.com/api?v=2.0&ak=LGMrf31qh08mFHTSNVdbrgSpaPBkx4oc"></script>-->
<script src="./plugins/validate/js/bootstrapValidator.min.js"></script>
<!-- DataTables -->
<script src="./plugins/datatables/jquery.dataTables.js"></script>
<script src="./plugins/datatables/dataTables.bootstrap4.js"></script>
<!-- Select2 -->
<script src="./plugins/select2/select2.full.min.js"></script>
<!-- date-range-picker -->
<script src="./plugins/daterangepicker/daterangepicker.js"></script>
<script src="./plugins/easyUpload/easyUpload.js"></script>
<script src="./dist/js/demo.js"></script>
<script src="./dist/js/vue.js"></script>
<script>
    $(function () {
        $.startLoading(true);
        menuList();
        menuAction(this, './web/main2_part1.html', false);
        /* BOOTSTRAP SLIDER */
        $('.slider').slider()

        /* ION SLIDER */
        $('#range_1').ionRangeSlider({
            min: 0,
            max: 5000,
            from: 1000,
            to: 4000,
            type: 'double',
            step: 1,
            prefix: '$',
            prettify: false,
            hasGrid: true
        })
        $('#range_2').ionRangeSlider()

        $('#range_5').ionRangeSlider({
            min: 0,
            max: 10,
            type: 'single',
            step: 0.1,
            postfix: ' mm',
            prettify: false,
            hasGrid: true
        })
        $('#range_6').ionRangeSlider({
            min: -50,
            max: 50,
            from: 0,
            type: 'single',
            step: 1,
            postfix: '°',
            prettify: false,
            hasGrid: true
        })

        $('#range_4').ionRangeSlider({
            type: 'single',
            step: 100,
            postfix: ' light years',
            from: 55000,
            hideMinMax: true,
            hideFromTo: false
        })
        $('#range_3').ionRangeSlider({
            type: 'double',
            postfix: ' miles',
            step: 10000,
            from: 25000000,
            to: 35000000,
            onChange: function (obj) {
                var t = ''
                for (var prop in obj) {
                    t += prop + ': ' + obj[prop] + '\r\n'
                }
                $('#result').html(t)
            },
            onLoad: function (obj) {
                //
            }
        })
    })
</script>
<script>
    function menuAction(obj, href, flag) {
        if (href.indexOf("admin.action") != -1) {
            $("#content-wrapper").addClass("background-style");
        } else {
            $("#content-wrapper").removeClass("background-style");
        }

        if (flag) {
            $("#content-wrapper").addClass("background-style");
        } else {
            $("#content-wrapper").removeClass("background-style");
        }

        var tds = $("nav").children();
        var i;
        $.each(tds, function (i, val) {
            if ($(val) != $(obj)) {
                $(val).find("li.has-treeview").removeClass("menu-open");
                $(val).find("ul.nav-treeview").css("display", "none");
            }
            var tt = $(val).find("a");
            tt.removeClass("active");

        });

        var object = $(obj);
        object.addClass("active");
        $(obj).parent().parent().parent("li.has-treeview").addClass("menu-open");
        $(obj).parent().parent("ul.nav-treeview").css("display", "block");
        $("#content-wrapper").load(href);

    }

    function menuList() {
        var id = $(this).attr("id");
        if (id != -1) {
            var url = encodeURI("./menuList.action");
            $.ajax({
                type: 'POST',
                url: url,
                data: {},
                dataType: "json",
                success: function (result) {
                    if (result.success) {

                        //刷新表格
                        var data = result.data;
                        $("#user_role").text(result.admin.name + "-" + result.admin.roleType.name);


                        var nav = $("#nav");
                        var html = '';
                        $.each(data, function (i, val) {
                            var active = val.menu.isSelected == true ? 'active' : '';
                            var sub = val.menu.type == 2 ? 'has-treeview' : '';
                            html = '';
                            html = '<li class="nav-item ' + sub + '">';
                            if (val.menu.type == 2) {
                                html += '<a href="' + val.menu.href + '" onclick="' + val.menu.action + '" class="nav-link ' + active + '">';
                            } else {
                                html += '<a href="' + val.menu.href + '" class="nav-link ' + active + '">';
                            }

                            html += '<i class="nav-icon fa ' + val.menu.icon + '"></i><p>';

                            html += val.menu.name;
                            if (val.menu.type == 2) {
                                html += '<i class="right fa fa-angle-left"></i>';
                            }
                            html += '</p></a>';
                            if (val.submenus != null && val.submenus.length > 0) {
                                html += '<ul class="nav nav-treeview">';
                                $.each(val.submenus, function (j, value) {
                                    html += '<li class="nav-item">';
                                    html += '<a href="#" onclick="' + value.action + '" class="nav-link">';
                                    html += '<i class="fa nav-icon"></i><p>';
                                    html += value.name;
                                    html += '</p></a></li>';
                                });

                                html += '</ul>';
                            }
                            html += '</li>';
                            nav.append(html);
                        })

                    }

                    $.startLoading(false);
                },
                dataType: "json"
            });
        } else {

        }

    }
</script>
<div id="loading" class="loading"></div>
</body>

</html>
